﻿namespace EyeOpen.BomberMan
{
	using System.Windows.Forms;

	public class KeyEventToActionType
	{
		public ActionType Convert(bool control, Keys keyCode)
		{
			if (control)
			{
				return ActionType.PlaceBomb;
			}

			switch (keyCode)
			{
				case Keys.Up:
					return ActionType.Up;
				
				case Keys.Down:
					return ActionType.Down;

				case Keys.Left:
					return ActionType.Left;

				case Keys.Right:
					return ActionType.Right;

				default:
					return ActionType.None;
			}
		}
	}
}